Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use /nix/var/tmp as default tmpRoot #1085

Closed
wants to merge 1 commit into from
Closed

Conversation

LnL7
Copy link
Member

@LnL7 LnL7 commented Oct 11, 2016

the default TMPDIR on OSX is set to a pretty long path in /var/folders
this causes unit tests that try to create unix domain sockets in the
build directory or a TMPDIR to fail.

This change uses /nix/var/tmp by default even if TMPDIR is set, but it's still overridable with NIX_TMPDIR

This still builds with this change for example: https://gist.github.com/LnL7/cdf69b7f231bdedfef5c11ce0c276c7f

the default TMPDIR on OSX is set to a pretty long path in /var/folders
this causes unit tests that try to create unix domain sockets in the
build directory or a TMPDIR to fail.
@edolstra
Copy link
Member

IMHO we shouldn't add more non-standard directories. If I wrote it today, I would use /var/{lib,log}/nix instead of /nix/var for instance.

@copumpkin
Copy link
Member

Fine by me as long as we end up with shorter names. Although in practice /var is a symlink to /private/var on OSX. But that's not much longer

On Oct 14, 2016, at 09:01, Eelco Dolstra notifications@github.com wrote:

IMHO we shouldn't add more non-standard directories. If I wrote it today, I would use /var/{lib,log}/nix instead of /nix/var for instance.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@vcunat
Copy link
Member

vcunat commented Oct 14, 2016

Perhaps nix.conf is a better place for nix-specific override of the default temporary dir? (EDIT: I don't expect users will need to change that often.)

@copumpkin
Copy link
Member

For an entire platform?
On Fri, Oct 14, 2016 at 12:14 Vladimír Čunát notifications@github.com
wrote:

Perhaps nix.conf is a better place to override the default temporary dir?


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#1085 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAAKP-kGVh3qsLm_yNdwxCpM1NjvtHXkks5qz6pngaJpZM4KUGLD
.

@vcunat
Copy link
Member

vcunat commented Oct 14, 2016

Well, in Darwin case some platform-specific default might be useful. There's also the case that on NixOS we have tmp-on-tmpfs by default, which might be too small for nix builds in some setups.

@LnL7
Copy link
Member Author

LnL7 commented Oct 14, 2016

The tmpOnTmpfs option is the reason why I didn't use /tmp/nix. Most other distros have that enabled by default AFAIK.

@veprbl
Copy link
Member

veprbl commented Oct 15, 2016

What is going to manage the cleanup of this /nix/var/tmp?

@domenkozar
Copy link
Member

@shlevy would long-shebang help here?

@shlevy
Copy link
Member

shlevy commented Oct 17, 2016

No, the problem here is a stupid limit in the types that specify a socket address, baked in to the kernel.

@domenkozar
Copy link
Member

Oh, AF_UNIX :)

@LnL7
Copy link
Member Author

LnL7 commented Jul 24, 2017

With the daemon this can be configured in the service without impacting a user's shell. That's a better solution then introducing another NIX_* environment variable.

@LnL7 LnL7 closed this Jul 24, 2017
FRidh pushed a commit to NixOS/nixpkgs that referenced this pull request Apr 21, 2020
* Replace LD_LIBRARY_PATH with OS-specific name (e.g. DYLD_LIBRARY_PATH
  on macOS).
* Disable Python tests on macOS, because they use gpg, which fails due
  to a very long socket path (NixOS/nix#1085).

The former should be fixed upstream. The latter is a Nix-specific issue,
but it can be worked-around upstream by making Python tests respect
--disable-gpg-test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants